home *** CD-ROM | disk | FTP | other *** search
/ BCI NET / BCI NET Dec 94.iso / archives / applications / wp / fcmacros.lha / OpenFonts < prev   
Text File  |  1994-03-02  |  2KB  |  69 lines

  1. /* $Id: $ */
  2. /**********************************************************************/
  3. /*
  4.  * Final Copy II Arexx Macro - OpenFonts
  5.  *
  6.  * Opens all fonts from several directories
  7.  * (see path definitions and patterns below)
  8.  *
  9.  * Requires: Final Copy II
  10.  * Author: Stefan Winterstein (winter@cs.uni-sb.de)
  11.  * Status: Public Domain
  12.  *
  13.  */
  14. /**********************************************************************/
  15. /*
  16.  * Here you can specify which fonts in which directories will be opened.
  17.  * Remember to adjust 'path.0' to the number of paths.
  18.  */
  19. path.1 = "CGFonts:~(#?bold#?|#?italic#?|#?fett#?|#?kursiv#?)#?.font"
  20. path.2 = "SWOLFonts:~(#?bold#?|#?italic#?)"     /* no Bold/Italic fonts */
  21. path.3 = "SWOLFonts:Deco/#?"
  22. path.4 = "SWOLFonts:Sans/~(#?bold#?|#?italic#?)"     /* no Bold/Italic fonts */
  23. path.5 = "SWOLFonts:Serif/~(#?bold#?|#?italic#?)"     /* no Bold/Italic fonts */
  24. path.0 = 5                        /* number of directories */
  25. /**********************************************************************/
  26. OPTIONS RESULTS
  27. /*
  28.  * Create a sorted file containg all fonts we want to open
  29.  */
  30. fontfiles = ""
  31. DO i=1 FOR path.0
  32.    ADDRESS COMMAND 'List >ram:fontlist.error "'||path.i||'" FILES LFORMAT=%p%n TO RAM:fontlist.'||i
  33.    fontfiles = fontfiles "RAM:fontlist."||i
  34. END i
  35. ADDRESS COMMAND 'Join' fontfiles 'TO RAM:fontlist.unsorted'
  36. ADDRESS COMMAND 'Sort RAM:fontlist.unsorted TO RAM:fontlist'
  37.  
  38. /**********************************************************************/
  39. /*
  40.  * Read fontlist file into variable 'fontlist.'
  41.  */
  42. i = 0
  43. IF OPEN(.infile, "RAM:fontlist", "R") THEN DO
  44.    DO UNTIL EOF(.infile)
  45.      i = i +1
  46.      fontlist.i = READLN(.infile)
  47.    END
  48.    CALL CLOSE(.infile)
  49. END
  50. fontlist.0 = i-1
  51.  
  52. /* ADDRESS COMMAND 'Delete RAM:fontlist#?' */
  53.  
  54. /**********************************************************************/
  55. /*
  56.  * Open all fonts from 'fontlist.' in FinalCopy
  57.  */
  58. 'Status FontName'
  59. oldfont = RESULT
  60.  
  61. DO i=1 FOR fontlist.0
  62.    'Font' fontlist.i
  63. END i
  64.  
  65. 'Font' oldfont    /* reset old font */
  66.  
  67. /**********************************************************************/
  68. EXIT
  69.